{% extends "base_admin.html" %}
{% load static %}

{%block css%}
<link rel="stylesheet" href="{%static '/css/admin_index.css'%}">
{%endblock%}


{%block content%}
<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">管理员管理</h3>
  </div>
  <div class="panel-body">
    <a class="btn btn-default" href="/admin/add">
        <span class="glyphicon glyphicon-list" aria-hidden="true"></span>
        添加用户
    </a>
    <form method="get" style="display: inline;">
      <div class="input-group col-sm-3" style="float: right;">
          <input type="text" class="form-control" placeholder="姓名" name="name">
          <span class="input-group-btn">
            <button class="btn btn-default" type="submit">Go!</button>
          </span>
      </div><!-- /input-group -->

    </form>
  </div>
 
</div>


<table class="table table-striped">
    <thead>
        <tr>
            <td>序号</td>
            <td class="">姓名</td>
            <td class="">密码</td>
            <td>操作</td>
        </tr>
    </thead>
    <tbody>
            {% for obj in queryset %}
                <tr>
                    <td class="info_id">{{forloop.counter0|add:page_id_start}}</td>
                    <td>{{obj.username}}</td>
                    <td>******</td>
                    <td style="display: flex;flex-direction: row;">
                        <a class="btn btn-primary btn-xs" href="" style="margin-right: 10px;">编辑</a>
                        <a class="cancel btn btn-danger btn-xs" data-id="{{obj.id}}">删除</a>
                    </td>
                </tr>
            {% endfor %}
    </tbody>
</table>


<nav aria-label="Page navigation">
  <ul style="justify-content: center;width: 100%;" class="pagination">
  {{page_info}}
    {{page_str}}
  </ul>
</nav>

{%endblock%}

{%block script%}
<script>
    
</script>
{%endblock%}